package com.jk.myimkit.imkit.widget.provide;

import com.jk.myimkit.imkit.model.ConversationProviderTag;
import com.jk.myimkit.imkit.model.UIConversation;
import com.jk.myimkit.imkit.userInfoCache.RongUserInfoManager;

@ConversationProviderTag(
        conversationType = "system",
        portraitPosition = 1
)
public class SystemConversationProvider extends PrivateConversationProvider implements IContainerItemProvider.ConversationProvider<UIConversation> {
    public SystemConversationProvider() {
    }

    public String getTitle(String id) {
        String name;
        if (RongUserInfoManager.getInstance().getUserInfo(id) == null) {
            name = id;
        } else {
            name = RongUserInfoManager.getInstance().getUserInfo(id).getName();
        }

        return name;
    }
}

